<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
<form method="post" action="?" id="dform" enctype="multipart/form-data">
    <input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
    <input type="hidden" name="file" value="<?php echo $file;?>"/>
    <input type="hidden" name="action" value="<?php echo $action;?>"/>
    <input type="hidden" name="forward" value="<?php echo $forward;?>"/>
	<input type="hidden" name="amid" value="<?php echo $amid;?>"/>
	<input type="hidden" name="modelType" value="<?php echo $modelType;?>"/>
    <div class="tt"><?php echo $tname;?></div>
	<div id="propTabs">
		<div id="propTabs-1" title="车款参数">
			<table cellpadding="2" cellspacing="1" class="tb">
				<tr>
					<td class="tl"><span class='f_red'>*</span> 选择车系</td>
					<td>
						<?php echo Post::autoComboCar('post[arbid]','post[arcid]', $arbid, $arcid, 1, 1); ?>
					</td>
				</tr>
				<tr>
					<td class="tl"><span class="f_red">*</span> 车款名称</td>
					<td><input name="post[name]" type="text" id="name" size="60" datatype="*" param_group="车款参数" nullmsg="请填写车款名称" value="<?php echo $name;?>"/></td>
				</tr>
				<?php if (isset($MFD) && !empty($MFD)) {
					foreach($MFD['field'] as $k => $v) {
						$MFD['field'][$k]['addition'].= ' param_group="车款参数"';
					};
					echo AutoField::html('<td class="tl">', '<td>', $extInfo, $MFD);
				} ?>
			</table>
		</div>
		<?php foreach ($EFD as $paramGroup) : ?>
		<div id="propTabs-<?php echo $paramGroup['arid']; ?>" title="<?php echo $paramGroup['name']; ?>">
			<table cellpadding="2" cellspacing="1" class="tb">
			<?php foreach($paramGroup['field'] as $k => $v) {
				$paramGroup['field'][$k]['addition'].= ' param_group="'.$paramGroup['name'].'"';
			}; ?>
			<?php if (isset($paramGroup['field']) && !empty($paramGroup['field']))  echo AutoField::html('<td class="tl">', '<td>', $extInfo, $paramGroup['field']); ?>
			</table>
		</div>
		<?php endforeach;?>
	</div>
    <div class="sbt"><input type="submit" name="submit" value=" 确 定 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value=" 重 置 " class="btn"/></div>
</form>

<script type="text/javascript">
	seajs.use(['$', 'vf', 'vf-css','easyui','easyui-css'], function($){
		var $tabs = $('#propTabs').tabs();
		$('#dform').Validform({
			tiptype:function(msg,o,cssctl){
				var title = $(o.obj[0]).attr('param_group');
				$tabs.tabs('select', title);
				if ( o.type == 3) {
					$.messager.show({
						title:'提示',
						msg:msg
					});
				}
			}
		});
	});
</script>
<script type="text/javascript">Menuon(<?php echo $menuid;?>);</script>
<?php include tpl('footer'); ?>